﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEditor;
using UnityEngine;

public class AssetTools
{
    public static string GetAssetPath(string fullpath)
    {
        return fullpath.Substring(fullpath.LastIndexOf("\\Assets\\") + 1);
    }

    public static void ClearConsole()
    {
        Type log = typeof(EditorWindow).Assembly.GetType("UnityEditor.LogEntries");
        MethodInfo clearMethod = log.GetMethod("Clear");
        clearMethod.Invoke(null, null);
    }
}
